 package org.fly.bean.common;


 public class BusinessException extends RuntimeException
{
    private ErrorTip errorTip;

    public BusinessException(ErrorTip errorTip){
        this.errorTip = errorTip;
    }

    public BusinessException(int code,String msg){
        this(null);
        ErrorTip errorTip = new ErrorTip(code,msg);
        this.errorTip = errorTip;
    }

    public ErrorTip getErrorTip() {
        return this.errorTip;
    }

    public String toString()
    {
        return "BusinessException{errorCode=" + this.errorTip.getCode() + " errorMsg:" + this.errorTip.getMsg() + '}';
    }
}
